﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverlightApplication4.Util
{
    public enum EditItemType
    {
        New = 0,
        Edit = 1
    }
    public partial class ItemWindow : ChildWindow
    {
        public EditItemType type;
        public ItemWindow()
        {
            
            InitializeComponent();
            Loaded += ItemWindow_Loaded;
        }

        public void Init(EditItemType _type)
        {
            type = _type;
        }

        void ItemWindow_Loaded(object sender, RoutedEventArgs e)
        {
            //this.Focus();
            //Dispatcher.BeginInvoke(() => { MaHangHoa.Focus(); });

        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }
    }
}

